all: test main

test: test.o Polynomial.o Spline.o InterConditions.o
	g++ -o test test.o Polynomial.o Spline.o InterConditions.o -llapacke -llapack -lrefblas -std=c++11
main:main.o Polynomial.o Spline.o InterConditions.o 
	g++ -o main main.o Polynomial.o Spline.o InterConditions.o -llapacke -llapack -lrefblas -std=c++11
main.o:main.cpp func.o
	g++ -c main.cpp -std=c++11
func.o:func.cpp
	g++ -c func.cpp -std=c++11
Polynomial.o:Polynomial.h Vec.h
	g++ -c Polynomial.cpp -std=c++11
Spline.o:Spline.h InterConditions.h Vec.h
	g++ -c Spline.cpp -llapacke -llapack -lrefblas -std=c++11
InterConditions.o:InterConditions.h 
	g++ -c InterConditions.cpp -std=c++11
test.o:test.cpp
	g++ -c test.cpp -std=c++11
debug:test.cpp main.cpp func.cpp Polynomial.cpp Polynomial.h Spline.cpp Spline.h InterConditions.h InterConditions.cpp 
	g++ -g -o test test.cpp Polynomial.cpp Spline.cpp InterConditions.cpp -llapacke -llapack -lrefblas -std=c++11
	g++ -g -o main main.cpp func.cpp Polynomial.cpp Spline.cpp InterConditions.cpp -llapacke -llapack -lrefblas -std=c++11
doc:Programming.tex
	pdflatex Programming.tex
	-rm *.aux *.log *.gz
	evince Programming.pdf

clean:
	-rm *.o test main *.txt
